#include <bits/stdc++.h>
using namespace std;
#define int long long
#define lowbit(x) (x & -x)
int n, q, top, c[300005], pos[300005], w[300005], ans[300005], qu[300005];
vector<pair<int, int>> ask[300005], up[300005];

void update(int x, int y)
{
    while (x) {
        c[x] = min(c[x], y);
        x -= lowbit(x);
    }
}

int query(int x)
{
    int ans = INT64_MAX;
    while (x <= n)
        ans = min(ans, c[x]), x += lowbit(x);
    return ans;
}

int dist(int x, int y)
{
    return abs(pos[x] - pos[y]) * (w[x] + w[y]);
}

signed main()
{
    memset(c, 0x3f, sizeof c);
    cin >> n >> q;
    for (int i = 1; i <= n; i++)
        cin >> pos[i] >> w[i];
    for (int i = 1; i <= n; i++) {
        while (top && w[qu[top]] > w[i])
            top--;
        if (top)
            up[i].push_back(make_pair(qu[top], dist(i, qu[top])));
        qu[++top] = i;
    }
    top = 0;
    for (int i = n; i >= 1; i--) {
        while (top && w[qu[top]] > w[i])
            top--;
        if (top)
            up[qu[top]].push_back(make_pair(i, dist(i, qu[top])));
        qu[++top] = i;
    }
    for (int i = 1; i <= q; i++) {
        int l, r;
        cin >> l >> r;
        ask[r].push_back(make_pair(l, i));
    }
    for (int i = 1; i <= n; i++) {
        for (auto x : up[i])
            update(x.first, x.second);
        for (auto x : ask[i])
            ans[x.second] = query(x.first);
    }
    for (int i = 1; i <= q; i++)
        cout << ans[i] << endl;
    return 0;
}